﻿namespace Batman.Maintenance.DTO.ActionBar
{
    public class MaintenceAction
    {
        public string Label { get; set; }

        public string ActionUrl { get; set; }

        public string Method { get; set; }

        /// <summary>
        /// 执行前是否要确认
        /// </summary>
        public bool ConfirmBefore { get; set; }

        /// <summary>
        /// 确认用的文本
        /// </summary>
        public string ConfirmText { get; set; }

        public MaintenceAction() { }

        public MaintenceAction(string label, string actionUrl, string method, bool confirmBefore, string confirmText = null)
        {
            this.Label = label;
            this.ActionUrl = actionUrl;
            this.Method = method;
            this.ConfirmBefore = confirmBefore;
            this.ConfirmText = confirmText;
        }
    }
}
